<html>
<head>
<title>任务详细信息</title>
{% include "systy.html" %}
<script charset="utf-8" src="/bootstrap/js/kindeditor/kindeditor-min.js"></script>
<script charset="utf-8" src="/bootstrap/js/kindeditor/lang/zh_CN.js"></script>
</head>
<body>
{% ifnotequal username None%}
{% include "head3.html" %}
<div class="mytask_div">
    <div class="location_div">位置：任务系统 >> {{TID.task_name}} </div>
    <div class="mytask_div1">
        <div class="mytask_title">{{TID.task_name}}</div>
        <div class="mytask_time">发布者：{{TID.from_name}} &nbsp;&nbsp; 发布时间：{{TID.now_time|date:"Y-m-d H:i:s"}} &nbsp;&nbsp; 完成时间：{{TID.completion_time|date:"Y-m-d H:i:s"}}</div>
    </div>
    {% ifequal TID.task_status "0" %}
        <div class="mytask_div2">
            <div class="progress progress-striped active">
              <div class="progress-bar progress-bar-danger"  role="progressbar" aria-valuenow="3" aria-valuemin="0" aria-valuemax="100" style="width: 3%">
                <span class="sr-only">3% Complete</span>
              </div>
            </div>    
        </div>
        <div class="mytask_div3"><label class="label label-danger">等待处理</label></div>
    {% endifequal%}
    {% ifequal TID.task_status "1" %}
        <div class="mytask_div2">
            <div class="progress progress-striped active">
              <div class="progress-bar progress-bar-success"  role="progressbar" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100" style="width: 50%">
                <span class="sr-only">50% Complete</span>
              </div>
            </div>    
        </div>
        <div class="mytask_div4"><label class="label label-success">正在处理</label></div>
    {% endifequal%}
    {% ifequal TID.task_status "2" %}
        <div class="mytask_div2">
            <div class="progress progress-striped active">
              <div class="progress-bar progress-bar-info"  role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%">
                <span class="sr-only">100% Complete</span>
              </div>
            </div>    
        </div>
        <div class="mytask_div5"><label class="label label-default">处理完成</label></div>
    {% endifequal%}
    {% ifequal TID.to_name username %}
    <div class="mytask_div6">
        <form action="" method="post">
            {% ifequal TID.task_status "0"%}</span><input class="btn btn-primary btn-sm" type="submit" name="accept" value="接收任务"></br>{% endifequal %}
            {% ifequal TID.task_status "1"%}<input class="btn btn-success btn-sm" type="submit" name="ok" value="完成任务"></br>{% endifequal %}
        </form>
    </div>
    {% endifequal %}
    <div class="mytask_div8">
        <label>任务内容：</label></br>
        {% autoescape off %}
            {{TID.content}}
        {% endautoescape %}
        
    </div>
    <div></div>
    {% for i in mycomments %}
    <div class="mytask_div7">  
            {{ forloop.counter }}#&nbsp; 来自：<font color="green">{{i.fromname}}</font> &nbsp;&nbsp; 时间：{{i.now_time|date:"Y-m-d H:i:s"}}
            <div class="mytask_div7_1">
            {% autoescape off %}
                {{i.content}}</br>
            {% endautoescape %}
            </div>
    </div>
    {% endfor %}
    <div class="mytask_div9">
    {% ifequal username TID.to_name%}
        <form action="" method="post">
            <textarea name="content" class="mytask_textarea"></textarea></br>
            <button type="submit" name="comments" class="btn btn-primary btn-sm"> 发表回复 </button>
        </form>
    {% endifequal %}
    {% ifequal username TID.from_name%}
        <form action="" method="post">
            <textarea name="content" class="mytask_textarea"></textarea></br>
            <button type="submit" name="comments" class="btn btn-primary btn-sm"> 发表回复 </button>
        </form>
    {% endifequal %}
    </div>
<script>
    var editor;
    KindEditor.ready(function(K) {
        editor = K.create('textarea[name="content"]', {
            uploadJson : '/upload.html',
            fileManagerJson : '/filemanager.html',
            allowFileManager : true,
            afterBlur:function(){this.sync();}
        });
    });
</script>


</div>
{% else %}
你无权访问，请<a href="/login.html">登陆!</a>
{% endifnotequal%}
</body>

</html>
